package com.xishu.bo;

import java.io.Serializable;
import java.util.Objects;

public class CardInfo implements Serializable {
    private static final long serialVersionUID = -8847058000812962249L;

    public String brand;

    public String last4;

    public CardInfo(String brand, String last4) {
        this.brand = brand;
        this.last4 = last4;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getLast4() {
        return last4;
    }

    public void setLast4(String last4) {
        this.last4 = last4;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CardInfo cardInfo = (CardInfo) o;
        return Objects.equals(brand, cardInfo.brand) &&
                Objects.equals(last4, cardInfo.last4);
    }

    @Override
    public int hashCode() {
        return Objects.hash(brand, last4);
    }
}
